package com.atguigu.eduservice.client;

import com.atguigu.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

//调用服务的名称，实现类class
@FeignClient(name = "service-ucenter", fallback = UcenterFeignClient.class)
@Component
public interface UcenterClient {

    //定义调用方法的路径
    //根据token获取用户信息：String jwtToken
    //@PathVariable注解一定要指定参数名称，否则出错
    //调用controller的地址
    @GetMapping("/eduCenter/member/getMemberInfo/ByString")
    public R getMemberInfoByToken(@RequestParam("jwtToken") String jwtToken);
}
